import config from "@/config"
import http from "@/utils/request"

export default {
	lists: {
		url: `${config.API_URL}/adminapi/shop.shop_ware/lists`,
		name: "获取仓库列表",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
	edit: {
		url: `${config.API_URL}/adminapi/shop.shop_ware/edit`,
		name: "修改仓库",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
	},
	add: {
		url: `${config.API_URL}/adminapi/shop.shop_ware/add`,
		name: "添加仓库",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
	},
	delete: {
		url: `${config.API_URL}/adminapi/shop.shop_ware/delete`,
		name: "删除仓库",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
	},
    update_status: {
		url: `${config.API_URL}/adminapi/shop.shop_ware/update_default`,
		name: "仓库切换",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
	},
	detail: {
		url: `${config.API_URL}/adminapi/shop.shop_ware/detail`,
		name: "修改仓库状态",
		get: async function(params){
			return await http.get(this.url, params);
		}
	},
    head: {
		url: `${config.API_URL}/adminapi/shop.shopGoodsStock/get_common`,
		name: "仓库数据",
		get: async function(params){
			return await http.get(this.url, params);
		}
	},
    body: {
		url: `${config.API_URL}/adminapi/shop.shopGoodsStock/main`,
		name: "库存数据",
		get: async function(params){
			return await http.get(this.url, params);
		}
	},
	Stocklists: {
		url: `${config.API_URL}/adminapi/shop.shopGoodsStock/lists`,
		name: "库存数据",
		get: async function(params){
			return await http.get(this.url, params);
		}
	},
    check: {
		url: `${config.API_URL}/adminapi/shop.shopGoodsStock/stock_log`,
		name: "库存变动",
		get: async function(params){
			return await http.get(this.url, params);
		}
	},
    export: {
		url: `${config.API_URL}/adminapi/shop.shopGoodsStock/excel`,
		name: "库存变动",
		get: async function(params){
			return await http.get(this.url, params);
		}
	},
    other:{
        list: {
            url: `${config.API_URL}/adminapi/stock.OtherStock/lists`,
            name: "获取其他出入库列表",
            get: async function(params){
                return await http.get(this.url, params);
            }
        },
	    goodsLists: {
		    url: `${config.API_URL}/adminapi/stock.OtherStock/goodsLists`,
		    name: "其他出入库单明细",
		    get: async function(params){
			    return await http.get(this.url, params);
		    }
	    },
        edit: {
            url: `${config.API_URL}/adminapi/stock.OtherStock/edit`,
            name: "修改其他出入库",
            post: async function(data={}){
                return await http.post(this.url, data);
            }
        },
        add: {
            url: `${config.API_URL}/adminapi/stock.OtherStock/add`,
            name: "添加其他出入库",
            post: async function(data={}){
                return await http.post(this.url, data);
            }
        },
        delete: {
            url: `${config.API_URL}/adminapi/stock.OtherStock/delete`,
            name: "删除其他出入库",
            post: async function(data={}){
                return await http.post(this.url, data);
            }
        },
        detail: {
            url: `${config.API_URL}/adminapi/stock.OtherStock/detail`,
            name: "修改其他出入库状态",
            get: async function(params){
                return await http.get(this.url, params);
            }
        },
        check: {
			url: `${config.API_URL}/adminapi/stock.OtherStock/checkStatus`,
			name: "其他出入库审核",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        uncheck: {
			url: `${config.API_URL}/adminapi/stock.OtherStock/uncheckStatus`,
			name: "其他出入库 反审核",
	        post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
    },
    // 领料单
    receive:{
        list: {
            url: `${config.API_URL}/adminapi/production.ProductionPicking/lists`,
            name: "获取领料单列表",
            get: async function(params){
                return await http.get(this.url, params);
            }
        },
        edit: {
            url: `${config.API_URL}/adminapi/production.ProductionPicking/edit`,
            name: "修改领料单",
            post: async function(data={}){
                return await http.post(this.url, data);
            }
        },
        add: {
            url: `${config.API_URL}/adminapi/production.ProductionPicking/add`,
            name: "添加领料单",
            post: async function(data={}){
                return await http.post(this.url, data);
            }
        },
        delete: {
            url: `${config.API_URL}/adminapi/production.ProductionPicking/delete`,
            name: "删除领料单",
            post: async function(data={}){
                return await http.post(this.url, data);
            }
        },
        detail: {
            url: `${config.API_URL}/adminapi/production.ProductionPicking/detail`,
            name: "修改领料单状态",
            get: async function(params){
                return await http.get(this.url, params);
            }
        },
        check: {
			url: `${config.API_URL}/adminapi/production.ProductionPicking/checkStatus`,
			name: "领料单审核",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        uncheck: {
			url: `${config.API_URL}/adminapi/production.ProductionPicking/uncheckStatus`,
			name: "领料单 反审核",
	        post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
    },
    // 退料单
    return:{
        list: {
            url: `${config.API_URL}/adminapi/stock.ProductionReturnMaterial/lists`,
            name: "获取退料单列表",
            get: async function(params){
                return await http.get(this.url, params);
            }
        },
        edit: {
            url: `${config.API_URL}/adminapi/stock.ProductionReturnMaterial/edit`,
            name: "修改退料单",
            post: async function(data={}){
                return await http.post(this.url, data);
            }
        },
        add: {
            url: `${config.API_URL}/adminapi/stock.ProductionReturnMaterial/add`,
            name: "添加退料单",
            post: async function(data={}){
                return await http.post(this.url, data);
            }
        },
        delete: {
            url: `${config.API_URL}/adminapi/stock.ProductionReturnMaterial/delete`,
            name: "删除退料单",
            post: async function(data={}){
                return await http.post(this.url, data);
            }
        },
        detail: {
            url: `${config.API_URL}/adminapi/stock.ProductionReturnMaterial/detail`,
            name: "修改退料单状态",
            get: async function(params){
                return await http.get(this.url, params);
            }
        },
        check: {
			url: `${config.API_URL}/adminapi/stock.ProductionReturnMaterial/checkStatus`,
			name: "退料单审核",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        uncheck: {
			url: `${config.API_URL}/adminapi/stock.ProductionReturnMaterial/uncheckStatus`,
			name: "退料单 反审核",
	        post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
    },


    
    // 仓库
    ware: {
        // 已打卷分类库存
        stock_inspect: {
            list: {
                url: `${config.API_URL}/adminapi/purchase.PurchaseInspect/lists`,
                name: "已打卷分类库存列表",
                get: async function(params){
                    return await http.get(this.url, params);
                }
            },
        },

        // 未打卷分类库存
        stock_uninspect: {
            list: {
                url: `${config.API_URL}/adminapi/purchase.ShopGoodsStock/lists`,
                name: "未打卷分类库存列表",
                get: async function(params){
                    return await http.get(this.url, params);
                }
            },
            goodsList: {
                url: `${config.API_URL}/adminapi/purchase.ShopGoodsStock/wareGoodsList`,
                name: "未打卷分类库存 -- 详情",
                get: async function(params){
                    return await http.get(this.url, params);
                }
            },
            house: {
                url: `${config.API_URL}/adminapi/purchase.ShopGoodsStockLog/lists`,
                name: "未打卷分类库存 -- 详情的入库详情",
                get: async function(params){
                    return await http.get(this.url, params);
                }
            },
        },
        // 单号溯源
        ordernosource: {
            list: {
                url: `${config.API_URL}/adminapi/base.Common/source`,
                name: "单号溯源",
                get: async function(params){
                    return await http.get(this.url, params);
                }
            },
            get_meter: {
                url: `${config.API_URL}/adminapi/base.Common/getTotalSize`,
                name: "单号溯源",
                get: async function(params){
                    return await http.get(this.url, params);
                }
            }
        },
        

        // 扫码获取数据
        scan: {
            url: `${config.API_URL}/adminapi/purchase.PurchaseSend/searchRollCode`,
            name: "扫码获取数据",
            get: async function(params){
                return await http.get(this.url, params);
            }
        },

        // 扫码作废单据
        repeal_scan: {
            url: `${config.API_URL}/adminapi/purchase.PurchaseInspect/softDelete`,
            name: "扫码作废单据",
            get: async function(params){
                return await http.get(this.url, params);
            }
        },

        // 发货
        send: {
            list: {
                url: `${config.API_URL}/adminapi/purchase.PurchaseSend/lists`,
                name: "获取发货列表",
                get: async function(params){
                    return await http.get(this.url, params);
                }
            },
            edit: {
                url: `${config.API_URL}/adminapi/purchase.PurchaseSend/edit`,
                name: "修改发货",
                post: async function(data={}){
                    return await http.post(this.url, data);
                }
            },
            updateFields: {
                url: `${config.API_URL}/adminapi/purchase.PurchaseSend/updateFields`,
                name: "修改发货字段",
                post: async function(data={}){
                    return await http.post(this.url, data);
                }
            },
            updateFieldsdetail: {
                url: `${config.API_URL}/adminapi/purchase.PurchaseSend/updateDetailFields`,
                name: "修改发货详情字段",
                post: async function(data={}){
                    return await http.post(this.url, data);
                }
            },
            add: {
                url: `${config.API_URL}/adminapi/purchase.PurchaseSend/add`,
                name: "添加发货",
                post: async function(data={}){
                    return await http.post(this.url, data);
                }
            },
            delete: {
                url: `${config.API_URL}/adminapi/purchase.PurchaseSend/delete`,
                name: "删除发货",
                post: async function(data={}){
                    return await http.post(this.url, data);
                }
            },
            detail: {
                url: `${config.API_URL}/adminapi/purchase.PurchaseSend/detail`,
                name: "发货详情",
                get: async function(params){
                    return await http.get(this.url, params);
                }
            },
            update: {
                url: `${config.API_URL}/adminapi/purchase.PurchaseSend/updateStatus`,
                name: "发货修改状态",
                post: async function(data={}){
                    return await http.post(this.url, data);
                }
            },
            statusList: {
                url: `${config.API_URL}/adminapi/purchase.PurchaseSend/updateStatusLogs`,
                name: "修改状态记录",
                get: async function(params){
                    return await http.get(this.url, params);
                }
            },
            house: {
                url: `${config.API_URL}/adminapi/purchase.PurchaseSend/addWare`,
                name: "发货入库",
                post: async function(data={}){
                    return await http.post(this.url, data);
                }
            },
            houserecord: {
                url: `${config.API_URL}/adminapi/purchase.PurchaseSend/updateStatus`,
                name: "发货入库 -- 记录",
                get: async function(data={}){
                    return await http.get(this.url, data);
                }
            },
            import: {
                url: `${config.API_URL}/adminapi/purchase.PurchaseSend/import`,
                name: "发货导入",
                post: async function(data={}){
                    return await http.post(this.url, data);
                }
            },
            restock: {
                url: `${config.API_URL}/adminapi/purchase.PurchaseSend/restock`,
                name: "发货/退货",
                post: async function(data={}){
                    return await http.post(this.url, data);
                }
            },

            // 作废记录
            cancel: {
                list: {
                    url: `${config.API_URL}/adminapi/purchase.PurchaseInspect/lists`,
                    name: "作废记录",
                    get: async function(params){
                        return await http.get(this.url, params);
                    }
                },
                add: {
                    url: `${config.API_URL}/adminapi/purchase.PurchaseSend/cancelRollCode`,
                    name: "作废记录添加",
                    post: async function(data={}){
                        return await http.post(this.url, data);
                    }
                },
                delete: {
                    url: `${config.API_URL}/adminapi/purchase.PurchaseSend/uncancelRollCode`,
                    name: "作废记录删除",
                    post: async function(data={}){
                        return await http.post(this.url, data);
                    }
                },
            },
        },

        // 货柜码单导出
        container_export:{
            url: `${config.API_URL}/adminapi/purchase.PurchaseSendPrint/getContainerCodePrint`,
            name: "货柜码单导出",
            get: async function(params){
                return await http.get(this.url, params);
            }
        },
        //  码单汇总导出
        code_all_export:{
            url: `${config.API_URL}/adminapi/purchase.PurchaseSendPrint/getCodeToalPrint`,
            name: "码单汇总导出",
            get: async function(params){
                return await http.get(this.url, params);
            }
        },
        // 明细码单导出
        code_detail_export:{
            url: `${config.API_URL}/adminapi/purchase.PurchaseSendPrint/getCodeDetailPrintNew`,
            name: "明细码单导出",
            get: async function(params){
                return await http.get(this.url, params);
            }
        },
        //  报关清单导出
        comparison_export:{
            url: `${config.API_URL}/adminapi/purchase.PurchaseSendPrint/getCustomPrintNew`,
            name: "报关清单导出",
            get: async function(params){
                return await http.get(this.url, params);
            }
        },

        // 供应商发货
        applysend: {
            list: {
                url: `${config.API_URL}/adminapi/purchase.PurchaseTurn/lists`,
                name: "获取发货列表",
                get: async function(params){
                    return await http.get(this.url, params);
                }
            },
            edit: {
                url: `${config.API_URL}/adminapi/purchase.PurchaseTurn/edit`,
                name: "修改发货",
                post: async function(data={}){
                    return await http.post(this.url, data);
                }
            },
            updateFields: {
                url: `${config.API_URL}/adminapi/purchase.PurchaseTurn/updateFields`,
                name: "修改发货字段",
                post: async function(data={}){
                    return await http.post(this.url, data);
                }
            },
            updateFieldsdetail: {
                url: `${config.API_URL}/adminapi/purchase.PurchaseTurn/updateDetailFields`,
                name: "修改发货详情字段",
                post: async function(data={}){
                    return await http.post(this.url, data);
                }
            },
            add: {
                url: `${config.API_URL}/adminapi/purchase.PurchaseTurn/add`,
                name: "添加发货",
                post: async function(data={}){
                    return await http.post(this.url, data);
                }
            },
            delete: {
                url: `${config.API_URL}/adminapi/purchase.PurchaseTurn/delete`,
                name: "删除发货",
                post: async function(data={}){
                    return await http.post(this.url, data);
                }
            },
            detail: {
                url: `${config.API_URL}/adminapi/purchase.PurchaseTurn/detail`,
                name: "发货详情",
                get: async function(params){
                    return await http.get(this.url, params);
                }
            },
            update: {
                url: `${config.API_URL}/adminapi/purchase.PurchaseTurn/checkStatus`,
                name: "发货修改状态",
                post: async function(data={}){
                    return await http.post(this.url, data);
                }
            },
            statusList: {
                url: `${config.API_URL}/adminapi/purchase.PurchaseTurn/updateStatusLogs`,
                name: "修改状态记录",
                get: async function(params){
                    return await http.get(this.url, params);
                }
            },
            // 扫码获取数据
            scan: {
                url: `${config.API_URL}/adminapi/purchase.PurchaseTurn/searchRollCode`,
                name: "扫码获取数据",
                get: async function(params){
                    return await http.get(this.url, params);
                }
            },
        },
        
        // 成品在库明细
        summary: {
            list: {
                url: `${config.API_URL}/adminapi/purchase.PurchaseInspect/lists`,
                name: "未打卷分类库存列表",
                get: async function(params){
                    return await http.get(this.url, params);
                }
            },
            import: {
                url: `${config.API_URL}/adminapi/purchase.PurchaseInspect/import`,
                name: "在库导入",
                post: async function(data={}){
                    return await http.post(this.url, data);
                }
            },
        },
        
    },
}
